import request from '@/common/request'

export function frontGenerator(data) {
  return request({
    url: '/crowdMarket/frontGenerator',
    method: 'post',
    data
  })
}

export function dataSchema(data) {
  return request({
    url: '/crowdMarket/dataSchema',
    method: 'post',
    data
  })
}

export function saveTemplate(data) {
  return request({
    url: '/crowdMarket/saveTemplate',
    method: 'post',
    data
  })
}

export function updateTemplate(data) {
  return request({
    url: '/crowdMarket/updateTemplate',
    method: 'post',
    data
  })
}

export function deleteTemplate(data) {
  return request({
    url: '/crowdMarket/deleteTemplate',
    method: 'post',
    data
  })
}

export function getTemplateList(data) {
  return request({
    url: '/crowdMarket/getTemplateList',
    method: 'post',
    data
  })
}

export function getTemplateValue(data) {
  return request({
    url: '/crowdMarket/getTemplateValue',
    method: 'post',
    data
  })
}

export function insertDatabase(data) {
  return request({
    url: '/crowdMarket/insertDatabase',
    method: 'post',
    data
  })
}

export function getAllTemplate(query) {
  return request({
    url: '/crowdMarket/getAllTemplate',
    method: 'get',
    params: query
  })
}